<?php

namespace Constructor;

class FactoryParameterFailureException extends Exception
{
    public function __construct( $name, $class, $msg = NULL )
    {
        $message = 'Cannot auto-assigning parameter \''.$name.'\' for class \''.
                   $class.'\'.'.( ! is_null( $msg )? ' Reason: '.$msg.'.' : '' );
                   
        parent::__construct( $message );
    }
}
